<template>
  <div id="app">
  <HeaderTop/>
  <router-view></router-view>
  <div style="height:50px"></div>
    <FooterGuide/>
  </div>
</template>

<script>
import FooterGuide from './FooterGuide/FooterGuide.vue'
import HeaderTop from './HeaderTop/HeaderTop.vue'

export default {
  name: 'app',
  data() {
    return {
      screenWidth:document.body.clientWidth
    }
  },mounted () {
const that = this

window.onresize = () => {
    return (() => {
        window.screenWidth = document.body.clientWidth
        that.screenWidth = window.screenWidth
    })()
}
},
  watch: {
    screenWidth(val){
        this.screenWidth = val
        document.documentElement.style="font-size:"+this.screenWidth/10+"px"
    
}
  },components: {
    FooterGuide,
    HeaderTop
  },
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
  
}
</style>
